# 文件的读取
# file = open("E:\\Desktop\\test.txt", "r", encoding="utf-8")
# print(file.readline())
# print(file.read())


# try:
#     file = open("E:\\Desktop\\test.txt", "r", encoding="utf-8")
#     print(file.readline())
#     print(file.read())
# finally:
#     file.close()

# with open("E:\\Desktop\\test.txt", "r", encoding="utf-8") as file:
#     print(file.readline())
#     print(file.read())


try:
    file = open("E:\\Desktop\\test.txt", "a", encoding="utf-8")
    file.write("hello world123")

finally:
    file.close()
